//
//  MineWalletViewController.m
//  renmingongshe
//
//  Created by macbook on 2017/10/24.
//  Copyright © 2017年 xiaodian. All rights reserved.
//

#import "MineWalletViewController.h"

@interface MineWalletViewController ()
@property (weak, nonatomic) IBOutlet UILabel *MoneyLabel;
@property (weak, nonatomic) IBOutlet UILabel *BalanceRemake;

@end

@implementation MineWalletViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.titleLabel.text = @"余额";
    self.view.backgroundColor = [UIColor colorWithHex:0xf2f2f2];
    
    _BalanceRemake.layer.borderColor = [[UIColor whiteColor]CGColor];
    _BalanceRemake.layer.borderWidth = 1.0f;
    [_BalanceRemake.layer setCornerRadius:10.0];
    _BalanceRemake.layer.masksToBounds = YES;
    
    [self downloadData];
}

- (void)downloadData
{
    [self.view loadingOnAnyView];
    [THWManager PostHttp:API(MineWallet) Parameters:@{@"userToken":[Utils getUserToken]} Success:^(id responseObject) {
        [self.view removeAnyView];
        if ([String(responseObject[@"status_code"]) isEqualToString:@"1008"]) {
            [self.view Message:responseObject[@"msg"]];
        }else{
            _MoneyLabel.text = [NSString stringWithFormat:@"%@", responseObject[@"data"]];
        }
    } andFalse:^(NSError *error) {
        [self.view removeAnyView];
    }];
}

- (IBAction)RechargeRecordClick:(UIButton *)sender {
}
- (IBAction)RechargeClick:(UIButton *)sender {
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
